home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 7 / Apprentice-Release7.iso / Environments / PowerFantasm™ 4.19a / Beginners guide / Beginners Mac Assembly - ed.srd / Beginners Mac Assembly - ed.srd.rsrc / PICT_5.png < prev    next >
Portable Network Graphic  |  1996-08-28  |  126KB  |  816x1056  |  8-bit (256 colors)
OCR: Wed. Aug 28, 1996 Beginners Guide To Macintosh Assembly Language Programming Page Any ideas about what this program does? It adds 20 and 10 and puts the result in sum Here's the breakdown Line :ppv move. W #10,d0 The Add is a 'label' Labels are used 0 reference lines of a program so we can change the program flow by 'jumping to labels. Think of it as name for this part of the program Move. means move word. In this case means move the pirM 10 (remember that word sixteen bits) into the processor. Line move.w #20,d1 This line has no label, and there fore cant be jumped to The instruction moves another number,in this case 20, into the processor. Line PPe op'ip This line instructs the processor ppe o, the two numbers together Line Move. op sum This instruction moves the result of the addition i ...